//
//  ProcurementHallTableViewCell.m
//  PlayerWorld
//
//  Created by 1 on 16/5/3.
//  Copyright © 2016年 刘成. All rights reserved.
//
#define UISCREEN_WIDTH  [UIScreen mainScreen].bounds.size.width
#define UISCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height

#import "ProcurementHallTableViewCell.h"

@implementation ProcurementHallTableViewCell
{
    UIImageView *theImageView;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // 彩种图片
        theImageView = [[UIImageView alloc] init];
        [theImageView setImage:[UIImage imageNamed:@"logo_qtc_2_lg"]];
        [self.contentView addSubview:theImageView];

        // 彩种标题
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(theImageView.frame)+10, 10, UISCREEN_WIDTH-120, self.contentView.bounds.size.height-20)];
        _titleLabel.font = [UIFont systemFontOfSize:16];
        [self.contentView addSubview:_titleLabel];

//        // 彩种副标题
//        UILabel *subheadingLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(theImageView.frame)+10, 30, UISCREEN_WIDTH-120, 20)];
//        subheadingLabel.font = [UIFont systemFontOfSize:12];
//        subheadingLabel.textColor = [UIColor lightGrayColor];
//        subheadingLabel.text = @"一分钟一期大奖根本停不下来";
//        [self.contentView addSubview:subheadingLabel];
//
//        // 彩种截止时间
//        UILabel *betcutoffLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(theImageView.frame)+10, 50, UISCREEN_WIDTH-120, 20)];
//        betcutoffLabel.font = [UIFont systemFontOfSize:12];
//        betcutoffLabel.textColor = [UIColor lightGrayColor];
//        betcutoffLabel.text = @"投注截止：00：23：25";
//        [self.contentView addSubview:betcutoffLabel];
//
        // 彩种详情
        UIImageView *colordetailsImageView = [[UIImageView alloc] initWithFrame:CGRectMake(UISCREEN_WIDTH-15-10, (60-30)/2, 15, 30)];
        [colordetailsImageView setImage:[UIImage imageNamed:@"icon_arrow"]];
        [self.contentView addSubview:colordetailsImageView];
    }
return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    theImageView.frame = CGRectMake(20, self.contentView.bounds.size.height/2-25, 50, 50);
    _titleLabel.frame = CGRectMake(70+10, 10, UISCREEN_WIDTH-120, self.contentView.bounds.size.height-20);
}
@end
